package info.androidhive.slidingmenu;
import java.util.ArrayList;
import java.util.Arrays;

import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

public class SearchRestaurantsFragment extends ListFragment{
	
    /** An array of items to display in ArrayList */
	    String android_versions[] = new String[]{
	            "Puchero",
	            "Burguer",
	            "HoneyComb",
	            "Ginger Bread",
	            "Froyo"
	    };
		ArrayList<String> restaurantes;

    public static SearchRestaurantsFragment newInstance(Bundle args) {
        SearchRestaurantsFragment fragment = new SearchRestaurantsFragment();
        fragment.setArguments(args);
        return fragment;
        
    }	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		restaurantes = new  ArrayList<String>();
		restaurantes.addAll(Arrays.asList(android_versions));
		/** Creating array adapter to set data in listview */
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity().getBaseContext(), android.R.layout.simple_list_item_multiple_choice, restaurantes);
        
        /** Setting the array adapter to the listview */
        setListAdapter(adapter);
		return super.onCreateView(inflater, container, savedInstanceState);
	}

}
